package view;

import java.awt.BorderLayout;

import javax.swing.JLabel;
import javax.swing.JPanel;

import controller.FirewallSession;

/**
 * Statistics table panel:
 * create table, defined scrollbar and label for the table
 */
public class StatisticsPanel extends JPanel
{
	/**
	 * Serial version ID - for serialization
	 */
	private static final long serialVersionUID = 3384190900212147920L;

	/**
	 * C'tor - initiate the table, define lable and scrollbar for it.
	 * @param ui		- the controller for the system actions
	 */
	public StatisticsPanel(FirewallSession ui)
	{	
		setLayout(new BorderLayout());

		JLabel label = new JLabel("Statistics for logger data with default settings:");
		add(label, BorderLayout.NORTH);
		
		StatisticsTable statistics = new StatisticsTable(ui);

		add(statistics.getLoggerTableHeader(), BorderLayout.CENTER);
		add(statistics, BorderLayout.SOUTH);
		statistics.getTableHeader().setReorderingAllowed(false);
	}
}
